package com.workerhelping.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * Iterator对象转List
 */
public class IteratorUtil {
    public static <T> List<T> toList(Iterable<T> iterable) {
        ArrayList<T> list = new ArrayList<>();
        for (T t : iterable)
            list.add(t);
        return list;
    }
}
